package com.tanhua.server.controller;

import com.tanhua.server.service.SoundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class SoundController {

    @Autowired
    private SoundService soundService;

    /**
     * 发送语音
     * @param soundFile
     * @return
     */
    @PostMapping("/peachblossom")
    public ResponseEntity addSound(MultipartFile soundFile){
        soundService.addSound(soundFile);
        return ResponseEntity.ok(null);
    }
}
